var mongoose = require('mongoose');
var db = mongoose.createConnection('mongodb://localhost:27017/wiki',{ useNewUrlParser: true ,useUnifiedTopology: true });
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function() {
  console.log("数据库wiki链接成功")
});
module.exports = db;